# -*- encoding:utf-8 -*-
"""
@作者：jiajun_Tang
@文件名：main.py
@时间：2023/7/26  下午 01:21
@文档说明:  程序主入口
"""

from PyQt5 import QtCore, QtWidgets, QtGui
from PyQt5.QtWidgets import QDialog

from graphical_user_interface.register_activity import startup_window
# from graphical_user_interface.event_trigger_gui import query_window
from event_trigger_gui import query_window


if __name__ == "__main__":
    import sys

    QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)  # 添加对高分屏的支持
    app = QtWidgets.QApplication(sys.argv)
    # window = query_window()
    # window = query_window(display_queue=None, height=None, all_width=None)
    # window.showMaximized()  # 最大化窗口
    # window.setFixedSize(window.width(), window.height())
    # window.show()
    # sys.exit(app.exec_())

    dialog = startup_window()
    dialog.show()
    if dialog.exec_() == QDialog.Accepted:
        the_window = query_window()   # db=database, db_table=opt.db_table, account_value=dialog.account_value)
        the_window.show()
        sys.exit(app.exec_())

